package com.hnevc.xiewenguang;

import java.util.Scanner;

public class Example02 { public static void main(String[] args) {
    float price;
    int count;
    float discount, money;
    Scanner sc = new Scanner(System.in);
    System.out.print("请输入图书的定价：");
    price = sc.nextFloat();
    System.out.print("请输入图书的数量：");
    count = sc.nextInt();
    if (count >= 100)
        discount = 0.8f;
    else if (count >= 10)
        discount = 0.85f;
    else
        discount = 0.9f;
    money = price * count * discount;
    System.out.println("您本次购书的总金额为：" + money);
}
}



